package main

import (
	"fmt"
)

type Singer interface {
	Sing() string
}

type Person struct {
	id     int
	name   string
	sex    string
	salary float32
}

// 表示Person 实现了这个方法  实现得来方法
func (p Person) Sing() string {
	return "miaomiaomiao~~~"
}

func (p Person) MyMethod() string {
	return "struct itself method"
}

func main() {
	p := Person{
		id:     1,
		name:   "青青子衿",
		sex:    "female",
		salary: 1800,
	}

	fmt.Println(p)
	fmt.Println(p.Sing())
}
